Skip to content

feat(workspaces): bulk-clear unmapped folders + clearer approval opt-out - #172

Merged
its-mash merged 1 commit into
mainfrom
feat/workspaces-clear-unmapped-and-approval-link
Jun 16, 2026
Merged

feat(workspaces): bulk-clear unmapped folders + clearer approval opt-out#172
its-mash merged 1 commit into
mainfrom
feat/workspaces-clear-unmapped-and-approval-link

Conversation

@its-mash

Copy link
Copy Markdown
Member

What & why

Two small UX gaps surfaced while using the Workspaces tab and the meta-tool approval prompt.

1. Clear all unmapped folders at once

The Workspaces tab lists folders connected clients reported but that aren't mapped to a FeatureSet yet (amber Unmapped cards). You could filter to them, but there was no way to dismiss them in bulk — and dismissing them is exactly how you get McpMux to re-offer the "map this folder?" prompt.

  • SessionRootsRegistry::forget_unmapped_roots() drops the unmapped roots from the in-memory session-roots registry. A session left with no roots is removed entirely (along with its resolution snapshot + probe throttle) so its next tools/list re-probes the peer and the resolver re-fires WorkspaceNeedsBinding — i.e. the prompt appears again. Sessions still holding a mapped root are left untouched.
  • clear_unmapped_reported_roots Tauri command snapshots the bound roots (same exact-match rule the UI uses to label a card "Unmapped"), clears the rest, and emits SessionRootsChanged so the tab refreshes.
  • The Workspaces tab gains a Clear unmapped button (shown only while there are unmapped folders) behind a confirm, with a toast that sets the "you'll be asked again" expectation.

2. Make the approval opt-out noticeable

The "manage approval prompts" escape hatch on the meta-tool approval dialog was an 11px muted link that was easy to miss. It's now a bordered, icon-led button above a divider so the path to turning these prompts off is actually visible. Behavior is unchanged (deny the current request, then route to the Built-in tab where the toggle lives).

Tests

  • Rust unit tests for forget_unmapped_roots — clears unmapped sessions (and resets their snapshot so the next resolve re-prompts), keeps mixed sessions that still hold a mapped root.
  • New WorkspacesClearUnmapped.test.tsx — the button only appears while there are unmapped folders, and confirming it calls clearUnmappedReportedRoots.
  • The existing approval-dialog test stays green (testid-based; only the link's styling/label changed).

Validation (local)

cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, pnpm typecheck, pnpm -r lint (0 errors), Rust unit tests, and the full vitest suite (200 passed) all pass.

Two UX gaps on the Workspaces tab and the meta-tool approval prompt.

Clear-all-unmapped:
The Workspaces tab lists folders connected clients have reported but that
aren't mapped to a FeatureSet yet (amber "Unmapped" cards). There was no way
to dismiss them in bulk. Adds a "Clear unmapped" action that forgets every
unmapped reported root in one go:

  - SessionRootsRegistry::forget_unmapped_roots() drops the unmapped roots
    from the in-memory registry. A session left with no roots is removed
    entirely (with its resolution snapshot + probe throttle) so its next
    tools/list re-probes the peer and the resolver re-fires
    WorkspaceNeedsBinding — i.e. the "map this folder?" prompt is offered
    again. Sessions still holding a mapped root are untouched.
  - clear_unmapped_reported_roots Tauri command snapshots the bound roots
    (same exact-match rule the UI uses to label a card "Unmapped"), clears
    the rest, and emits SessionRootsChanged so the tab refreshes.
  - Workspaces tab gains a "Clear unmapped" button (shown only while
    counts.unmapped > 0) behind a confirm, with a toast that sets the
    "you'll be asked again" expectation.

Approval opt-out visibility:
The "manage approval prompts" escape hatch on the meta-tool approval dialog
was an 11px muted link that was easy to miss. Promotes it to a bordered,
icon-led button above a divider so the path to turning these prompts off is
actually noticeable. Behavior is unchanged (deny + route to Built-in tab).

Tests: registry unit tests for forget_unmapped_roots (clears unmapped
sessions, keeps mixed sessions); a Workspaces test covering the button's
visibility and the confirm -> clear flow.

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash
its-mash merged commit 09b561c into main Jun 16, 2026
13 checks passed
@its-mash
its-mash deleted the feat/workspaces-clear-unmapped-and-approval-link branch June 16, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant